/**************************************************************************(C)*
 *
 *  This file is part of the GreenHills project
 *  Copyright (C) 2009  Tieto Corporation
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  Not for commmercial use. Only with Tieto permission.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *************************************************************************(C)*/

#pragma once

#include "roomitem.h"
#include "gps/gpsposition.h"
#include "coredll.h"

namespace greenhills {

namespace util {
    class obinstream;
    class ibinstream;
}

namespace core {

/** @brief Room item object with certain gps location
 *
 * This class represents object in a room which has some specific location.
 * The object is static - it doesn't move.
 */
class GH_CORE_CLASS CStaticRoomItem : public CRoomItem
{
public:
    CStaticRoomItem();
    CStaticRoomItem(const core::CItemId &pId, const std::string &nName);

public:
    virtual util::obinstream& operator<<(util::obinstream &pStream) const;
    virtual util::ibinstream& operator>>(util::ibinstream &pStream);

public:
    unsigned int timeStamp() const {return mTimeStamp;}
    gps::CGPSPosition position() const {return mPosition;}
    int altitude() const {return mAltitude;}

public:
    void setTimeStamp(const unsigned int &pTimeStamp)
        {mTimeStamp = pTimeStamp;}
    void setPosition(const gps::CGPSPosition &pPosition)
        {mPosition = pPosition;}
    void setAltitude(int pAltitude)
        {mAltitude = pAltitude;}

protected:
    unsigned int mTimeStamp;
    gps::CGPSPosition mPosition;
    int mAltitude;
};

} //namespace core
} //namespace greenhills
